package com.songcha.module_mine.ui.activity.feedback

import com.songcha.library_base.mvvm.base.BaseRepository
import com.songcha.library_business.api.ApiManager
import com.songcha.library_network.api.RetrofitClient
import com.songcha.library_network.bean.BaseBean
import com.songcha.module_mine.api.MineApiManager
import io.reactivex.Observable
import okhttp3.MediaType
import okhttp3.MediaType.Companion.toMediaTypeOrNull
import okhttp3.RequestBody
import okhttp3.RequestBody.Companion.toRequestBody
import org.json.JSONObject

class FeedbackRepository:BaseRepository() {
    fun commitFeedback(content:String):Observable<BaseBean>{
        val body = JSONObject().apply {
            put("feedback",content)
        }
        return MineApiManager.api.commitFeedback(body.toString().toRequestBody())
    }
}